package com.wson.configuration.xsample;

import com.wson.configuration.impl.XmlConfigurationExecutor;
import com.wson.configuration.sterotype.AbstractConfigurationExecutor;
import com.wson.dao.configuration.ISchemaExecutor;
import com.wson.platform.factory.impl.BeanFactory;

public class AppConfigurationExecutor extends AbstractConfigurationExecutor {

	public void  execute()throws Exception{
		
		ISchemaExecutor schemaexec = BeanFactory.getCurrentFactory().getDaoFactory().getSchemaExecutor();
		if(schemaexec!=null)
			schemaexec.execute(DEFAULT_DBSHCEMA, BeanFactory.getCurrentFactory().getProtonFactory().getProtons());		


		
		super.executeRelated();
		
		XmlConfigurationExecutor executor=new XmlConfigurationExecutor();
		
		executor.setXmlPath(this.generateConfigurationStorePath());
		executor.setXmlStartFile(DEFAULT_CONFIGURATIONFILE);		
		
		executor.execute();
		System.out.println("----------Finished!-----------");
	}

}
